package org.jeecg.modules.inspect.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.inspect.service.IInsTaskService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 任务提醒
 * @author: jeecg-boot
 */

@Slf4j
public class RemindTaskJob implements Job {

	@Autowired
	private IInsTaskService insTaskService;

	/**
	 * 所有人未巡检短信提醒（前一天16：00）
	 * @param jobExecutionContext
	 * @throws JobExecutionException
	 */
	@Override
	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
		log.info(String.format(" 未巡检提醒 !  开始时间:" + DateUtils.getTimestamp()));
		insTaskService.taskRemind();
		log.info(String.format(" 未巡检提醒 !  结束时间:" + DateUtils.getTimestamp()));
	}

}
